home *** CD-ROM | disk | FTP | other *** search
-
- Earl,
-
- first of all, I want to thank you a lot for this wonderful package. It's
- really a great job. So great that immediately after trying man2html, I managed
- to install related CGI scripts in my HTTP server; this is where the story
- starts.
-
- I'd like to focus your attention about serious security problems if those
- scripts. In fact, some filehandles are opened to a pipe which arguments come
- directly from user's query.
-
- For example, in "manpage", we have:
-
- $mancommand = "man $manflags $topic";
-
- and later:
-
- open (MAN, "$mancommand 2> /dev/null |")
-
- Now, if the user submits:
-
- ls ; rm -rf /
-
- as a topic, the whole command "man ls ; rm -rf /" is executed :-(
-
- As suggested in the "camel book", I replaced those commands with something as:
-
- open (MAN,"-|") || exec 'man',$manflags,$topic;
-
- which is more secure.
-
- Excuse me if I wasted your time. Cheers,
-
- -JCT-
-